home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power Programmierung
/
Power-Programmierung (Tewi)(1994).iso
/
magazine
/
progjour
/
1991
/
06
/
alib
/
isalnum.asm
< prev
next >
Wrap
Assembly Source File
|
1991-06-25
|
778b
|
68 lines
include asm.inc
public isalnum
public isalpha
public isalpha_
public isdigit
.code
;; isalnum
;
; entry AL character
; exit Zf if alphanumeric character
;
isalnum proc
call isalpha
jne isdigit
ret
isalnum endp
;; isalpha_
;
; entry AL character
; exit Zf if AL alphabetic or _ but not number
;
isalpha_ proc
cmp al,'_'
jne isalpha
ret
isalpha_ endp
;; isalpha
;
; entry AL character
; exit Zf if AL==A-Za-z
;
isalpha proc
cmp al,'A'
jb iap2
cmp al,'Z'
jbe iap1
cmp al,'a'
jb iap2
cmp al,'z'
ja iap2
iap1: cmp al,al
iap2: ret
isalpha endp
;; isdigit
;
; entry AL char
; exit Zf if 0..9
;
isdigit proc
cmp al,'0'
jb idg1
cmp al,'9'
ja idg1
cmp al,al
idg1: ret
isdigit endp
end